<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns=http://www.w3.org/1999/xhtml>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta name="author" content="张宝财 &lt; talent518@yeah.net &gt;" />
		<meta name="copyright" content="张宝财 &lt; talent518@yeah.net &gt;" />
		<title>俄罗斯方块</title>
		<link href="tetris.css" media="screen" rel="stylesheet" type="text/css" />
		<script type="text/javascript" src="jquery.min.js"></script>
		<script type="text/javascript" src="tetris.js"></script>
		<script type="text/javascript" src="soundmanager.js"></script>
	</head>
	<body>
		<div><!-- soundManager appends "hidden" Flash to the first DIV on the page. --></div>
		<div id="j-tetris-shape" style="margin:10px auto;"></div>
		<div id="j-tetris-game" style="text-align:center;"></div>
		<script type="text/javascript">
		soundManagerInit();
		
		$('#j-tetris-shape').tetrisShape('#j-tetris-game', {
			beforeScore: function(scores, lines) {
				soundManager.setVolume('score', 100);
				soundManager.play('score', 1);
			},
			afterSave: function(stack) {
				if(stack.length) {
					return;
				}
				
				soundManager.setVolume('save', 50);
				soundManager.play('save');
			},
			shapeDownCallback: function(shapeIndex, isFall) {
				soundManager.play('bomb' + (isFall ? '-fall' : ''));
			}
		});
		</script>
	</body>
</html>
